package com.salinity.kun.algorithm.harmonic;

import java.util.HashMap;
import java.util.Map;


/**
 * 角速度,单位为 度/平太阳时 计算公式 ： 14.49205211 * u[0] + 0.54901653 * u[1] + 0.04106864 *
 * u[2] + 0.00464183 * u[3] + 0.00220641 * u[4] + 0.00000196 * u[5];
 * 
 * @author Administrator
 *
 */
public class AngularVelocity {
	private Map<TideSymbol, Double> angularVelocityMap = null;
	public AngularVelocity() {}
	
	public void init() {
		angularVelocityMap = new HashMap<>();
		angularVelocityMap.put(TideSymbol.Sa, 0.0410686);
		angularVelocityMap.put(TideSymbol.Ssa, 0.0821373);
		angularVelocityMap.put(TideSymbol.Mm, 0.5443747);
		angularVelocityMap.put(TideSymbol.MSf, 1.0158958);
		angularVelocityMap.put(TideSymbol.Mf, 1.0980331);
		angularVelocityMap.put(TideSymbol.Q1, 13.3986609);
		angularVelocityMap.put(TideSymbol.O1, 13.9430356);
		angularVelocityMap.put(TideSymbol.M1, 14.4920521);
		angularVelocityMap.put(TideSymbol.P1, 14.9589314);
		angularVelocityMap.put(TideSymbol.S1, 15.0000000);
		angularVelocityMap.put(TideSymbol.K1, 15.0410686);
		angularVelocityMap.put(TideSymbol.J1, 15.5854434);
		angularVelocityMap.put(TideSymbol.OO1, 16.1391017);
		angularVelocityMap.put(TideSymbol.N2, 28.4397295);
		angularVelocityMap.put(TideSymbol.M2, 28.9841042);
		angularVelocityMap.put(TideSymbol.L2, 29.5284789);
		angularVelocityMap.put(TideSymbol.S2, 30.0000000);
		angularVelocityMap.put(TideSymbol.K2, 30.0821373);
		angularVelocityMap.put(TideSymbol.M4, 57.9682085);
		angularVelocityMap.put(TideSymbol.MS4, 58.9841043);
		angularVelocityMap.put(TideSymbol.M6, 86.9523127);
	}
	
	public  Map<TideSymbol, Double> getAngel() {
		return angularVelocityMap;
	}

	/**
	 * 单位:°
	 * @param tideSymbol
	 * @return
	 */
	public  double getAngel(TideSymbol tideSymbol) {
		return angularVelocityMap.get(tideSymbol);
	}
}
